View Javadoc

1   /***
2    * AuthorizationServiceLocator.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis WSDL2Java emitter.
6    */
7   
8   package org.opensciencegrid.authz.stubs;
9   
10  public class AuthorizationServiceLocator extends org.apache.axis.client.Service implements org.opensciencegrid.authz.stubs.AuthorizationService {
11  
12      // FNAL Privilege Project Authorization Service
13  
14      // Use to get a proxy class for AuthorizationServicePort
15      private final java.lang.String AuthorizationServicePort_address = "http://131.225.206.62:8081/soap";
16  
17      public java.lang.String getAuthorizationServicePortAddress() {
18          return AuthorizationServicePort_address;
19      }
20  
21      // The WSDD service name defaults to the port name.
22      private java.lang.String AuthorizationServicePortWSDDServiceName = "AuthorizationServicePort";
23  
24      public java.lang.String getAuthorizationServicePortWSDDServiceName() {
25          return AuthorizationServicePortWSDDServiceName;
26      }
27  
28      public void setAuthorizationServicePortWSDDServiceName(java.lang.String name) {
29          AuthorizationServicePortWSDDServiceName = name;
30      }
31  
32      public org.opensciencegrid.authz.stubs.SAMLRequestPortType getAuthorizationServicePort() throws javax.xml.rpc.ServiceException {
33         java.net.URL endpoint;
34          try {
35              endpoint = new java.net.URL(AuthorizationServicePort_address);
36          }
37          catch (java.net.MalformedURLException e) {
38              throw new javax.xml.rpc.ServiceException(e);
39          }
40          return getAuthorizationServicePort(endpoint);
41      }
42  
43      public org.opensciencegrid.authz.stubs.SAMLRequestPortType getAuthorizationServicePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
44          try {
45              org.opensciencegrid.authz.stubs.AuthorizationServiceBindingStub _stub = new org.opensciencegrid.authz.stubs.AuthorizationServiceBindingStub(portAddress, this);
46              _stub.setPortName(getAuthorizationServicePortWSDDServiceName());
47              return _stub;
48          }
49          catch (org.apache.axis.AxisFault e) {
50              return null;
51          }
52      }
53  
54      /***
55       * For the given interface, get the stub implementation.
56       * If this service has no port for the given interface,
57       * then ServiceException is thrown.
58       */
59      public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
60          try {
61              if (org.opensciencegrid.authz.stubs.SAMLRequestPortType.class.isAssignableFrom(serviceEndpointInterface)) {
62                  org.opensciencegrid.authz.stubs.AuthorizationServiceBindingStub _stub = new org.opensciencegrid.authz.stubs.AuthorizationServiceBindingStub(new java.net.URL(AuthorizationServicePort_address), this);
63                  _stub.setPortName(getAuthorizationServicePortWSDDServiceName());
64                  return _stub;
65              }
66          }
67          catch (java.lang.Throwable t) {
68              throw new javax.xml.rpc.ServiceException(t);
69          }
70          throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
71      }
72  
73      /***
74       * For the given interface, get the stub implementation.
75       * If this service has no port for the given interface,
76       * then ServiceException is thrown.
77       */
78      public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
79          if (portName == null) {
80              return getPort(serviceEndpointInterface);
81          }
82          String inputPortName = portName.getLocalPart();
83          if ("AuthorizationServicePort".equals(inputPortName)) {
84              return getAuthorizationServicePort();
85          }
86          else  {
87              java.rmi.Remote _stub = getPort(serviceEndpointInterface);
88              ((org.apache.axis.client.Stub) _stub).setPortName(portName);
89              return _stub;
90          }
91      }
92  
93      public javax.xml.namespace.QName getServiceName() {
94          return new javax.xml.namespace.QName("http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml", "AuthorizationService");
95      }
96  
97      private java.util.HashSet ports = null;
98  
99      public java.util.Iterator getPorts() {
100         if (ports == null) {
101             ports = new java.util.HashSet();
102             ports.add(new javax.xml.namespace.QName("AuthorizationServicePort"));
103         }
104         return ports.iterator();
105     }
106 
107 }